package com.zhifubao;


public class BankPay implements Pay {
    // 设置银行卡的余额
    private double m = 150;

    @Override
    public void pay(double money) {
        if(m >= money) {
            System.out.println("你消费的金额为：" + money);
            // 消费完的余额
            m = m - money;
            System.out.println("余额：" + m);
        } else {
            System.out.println("你的余额不足");
        }
    }
}